<%-- 
    Document   : add_student_post
    Created on : Nov 24, 2011, 8:18:50 PM
    Author     : THIENSUHACK
--%>



<%@page import="java.util.Calendar"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="GetData.DataWS"%>
<%@page import="dktc_ws.Quantri" %>
<%@page import="java.sql.Date" %>
<%@page import="GetData.CharsetFilter"%>



<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%
    request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    response.setContentType("text/html; charset=UTF-8"); 
   // CharsetFilter ab=new CharsetFilter();
    
    Quantri account = new Quantri();
    account.setTendangnhap(request.getParameter("tendangnhap"));
    account.setMatkhau(request.getParameter("matkhau"));
    account.setEmail(request.getParameter("email"));

    int result=0;
    DataWS a=new DataWS();
    result = a.themtaikhoan(account.getTendangnhap(),account.getEmail(),account.getMatkhau());
    if(result>0)
             {
       out.print("thanh cong");
        response.sendRedirect("/DKTC/admin/index.jsp?page=list_account");
   }
   else
       out.print("that bai");
           %>
           <div><a href="/DKTC/admin/index.jsp?page=list_account">Xem danh sách tin tức</a><a href="/DKTC/admin/index.jsp?page=add_news">Thêm Tin Mới</a></div>